package com.itheima.day12;

import java.util.Scanner;

public class Demo02 {
    public static void main(String[] args) {
        /*
        根据录入的月份输出对应的季节(switch)
         */
        Scanner sc = new Scanner(System.in);
        System.out.println("输出月份:");
        int month = sc.nextInt();
        //根据录入的月份输出对应的季节
        switch (month){
            default:
                System.out.println("您的数据错误,请重新输入:");
                break;
            case 1:
            case 2:
            case 12:
                System.out.println("冬季");
                break;
            case 3:
            case 4:
            case 5:
                System.out.println("春季");
                break;
            case 6:
            case 7:
            case 8:
                System.out.println("夏季");
                break;
            case 9:
            case 10:
            case 11:
                System.out.println("秋季");
                break;
        }
    }
}
